home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Developer's Kit 1996
/
Delphi Developer's Kit 1996.iso
/
power
/
chrono
/
chrono2.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-12-22
|
2KB
|
92 lines
unit Chrono2;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Infos, About, Menus, Toolbar,
ExtCtrls, MiscComp, Chronog, PanClock;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Edit1: TEdit;
Chrono1: TChrono;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Edit2: TEdit;
Edit3: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label6: TLabel;
Label7: TLabel;
Edit4: TEdit;
Button6: TButton;
PanelClock1: TPanelClock;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
private
{ Private-dΘclarations }
public
{ Public-dΘclarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.text:='0';
chrono1.start;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
chrono1.stop;
Edit1.text:= inttostr(chrono1.last);
Edit2.text:=inttostr(chrono1.total);
Edit3.text:=inttostr(chrono1.aver);
Edit4.text:=inttostr(chrono1.nb);
{ stopwatch1.show;}
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
chrono1.pause;
edit1.text:=inttostr(chrono1.last);
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
chrono1.continue;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
chrono1.raz;
edit1.text:='0';
edit2.text:='0';
edit3.text:='0';
edit4.text:='0';
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
chrono1.cancel;
edit1.text:=inttostr(chrono1.last);
end;
end.